home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGADOC4B.ZIP / NCR.TXT < prev    next >
Text File  |  1995-09-29  |  34KB  |  647 lines

  1.    NCR 77C21
  2.    NCR 77C22
  3.    NCR 77C22E    160pin 4MB, 1280x1024 256 col
  4.    NCR 77C22E+   160pin
  5.    NCR 77C32BLT  208pin BitBLT support
  6.  
  7.  
  8. 3C4h index  5  (R/W):  Extended Function Enable Register
  9. bit    0  Enables extended registers if set (3C4h index >=8, 3d4h index >=30h)
  10.        1  Reserved (always 0).
  11.        2  If set the Hardware Configuration registers (3C4h index 23h bit 0-3,
  12.           index 27h bit 1, index 1Fh bit 5 and index 1Eh bits 0-1) can be
  13.           modified. On the 77c32BLT this bit causes the memory to wrap at 512K
  14.           when set.
  15.      3-7  Reserved
  16.  
  17. 3C4h index  8  (R):  Version Number Register
  18. bit  0-3  Chip revision
  19.      4-7  Product Code: 0=77C22, 1=77C21, 2=77C22E (bits 0-3 <8) or 77C22E+
  20.            (bits 0-3 >=8), 3=77c32BLT.
  21.  
  22. 3C4h index 0Ah (R/W):  Cursor Color One Register
  23. bit  0-7  Foreground color of the Bit Mapped Cursor.
  24.           Selected if plane 0=0 and plane 1=1.
  25.  
  26. 3C4h index 0Bh (R/W):  Cursor Color Zero Register
  27. bit  0-7  Background color of the Bit Mapped Cursor.
  28.           Selected if plane 0=0 and plane 1=0.
  29.  
  30. 3C4h index 0Ch (R/W):  Cursor Control Register
  31. bit    0  Cursor Enable. When set enables the Bit Mapped cursor.
  32.      1-2  Cursor Height select.
  33.           0=16 lines, 1=32 lines, 2=64 lines and 3=128 lines.
  34.        3  Blink Frequency Select. If set the Bit Mapped Cursor is on for 16
  35.           frames and off for another 16 frames. If clear it is on for 8 frames
  36.           and off for another 8 frames.
  37.        4  Blink Enable. If set the Bit Mapped Cursor blinks.
  38.      5-6  (77c22E+,32 only) Cursor Repeat Count. Number of bytes per pixel the
  39.           cursor passes over: 0: 1byte/pixel, 1: 2b/p, 2: 3b/p, 3: 4b/p
  40.        7  (32 only) Cursor Width Select. If set selects a 64pixel wide cursor,
  41.           32pixel if clear
  42.  
  43. 3C4h index 0Dh (R/W):  Cursor X Location High register
  44. bit  0-2  Bits 8-10 of the horizontal position of the Bitmapped Cursor.
  45.           The lower 8 bits are in 3C4h index 0Eh.
  46.      3-7  Reserved
  47.  
  48. 3C4h index 0Eh (R/W):  Cursor X Location Low register
  49. bit  0-7  Lower 8 bits of the horizontal position of the Bitmapped Cursor.
  50.           The upper 3 bits are in 3C4h index 0Dh.
  51.  
  52. 3C4h index 0Fh (R/W):  Cursor Y Location High register
  53. bit  0-1  (22,22E) Bits 8-9 of the vertical position of the Bitmapped Cursor.
  54.           The lower 8 bits are in 3C4h index 10h.
  55.        2  (22E+,32) Bit 10 of the Cursor Vertical position
  56.  
  57. 3C4h index 10h (R/W):  Cursor Y Location Low register
  58. bit  0-7  Lower 8 bits of the vertical position of the Bitmapped Cursor.
  59.           The upper 2 bits are in 3C4h index 0Fh.
  60.  
  61. 3C4h index 11h (R/W):  Cursor X Index Register.
  62. bit  0-4  (22,22E,22E+) Horizontal location of the Hot Spot from the left of
  63.           the cursor.
  64.      0-5  (32) Bit 5 of the Cursor X Index
  65.  
  66. 3C4h index 12h (R/W):  Cursor Y Index Register.
  67. bit  0-6  Vertical location of the Hot Spot from the top of the cursor.
  68.        7  Reserved.
  69.  
  70. 3C4h index 13h (R/W):  Cursor Storage Register High.
  71. bit  0-7  Bits 8-15 of the address of the cursor bitmap. The lower 8 bits are
  72.           in 3C4h index 14h.
  73.  
  74. 3C4h index 14h (R/W):  Cursor Storage Register Low.
  75. bit  0-7  Bits 0-7 of the address of the cursor bitmap. The upper 8 bits are
  76.           in 3C4h index 13h. Must be an even address
  77. Note: The 22E+ and 32 only documents the lower 4 bits of index 14h and doesn't
  78.       document index 13h ??
  79.  
  80. 3C4h index 15h (R/W):  Cursor Storage Offset Register High.
  81. bit  0-7  Bits 8-15 of the Cursor Storage Offset. The lower 8 bits are in 3C4h
  82.           index 16h.
  83.  
  84. 3C4h index 16h (R/W):  Cursor Storage Offset Register Low.
  85. bit  0-7  Bits 0-7 of the Cursor Storage Offset. The upper 8 bits are in 3C4h
  86.           index 15h. If extended memory is enabled (3C4h index 1Eh bit4 set)
  87.           the Cursor Storage Offset is multiplied with 16 and added to the
  88.           Cursor Storage Address to form a 20 bit address.
  89. Note: The cursor map is stored as a #lines*(32+32bit) bitmap
  90.       The behavior of the cursor in each pixel is defined by the combination
  91.       of the pixels from the two 32bit maps (The first pixel of the cursor is
  92.       stored in the last byte):
  93.        1st   2nd    Description
  94.         0     0     Background color (index 0Bh)
  95.         0     1     Foreground color (index 0Ah)
  96.         1     0     screen data (transparent cursor)
  97.         1     1     Inverted screen data (XOR cursor)
  98. Note: It is possible that for the 77c22e revision 2 the pixel order in the map
  99.       should be reversed.
  100.  
  101. 3C4h index 17h (R/W):  Cursor Pixel Mask Register.
  102. bit  0-7  Each bit set allows the corresponding bit in a pixel to be
  103.           affected by the Bitmapped Cursor.
  104.  
  105. 3C4h index 18h (R/W):  Primary Host Offset Register High.
  106. bit  0-7  Bits 8-15 of the Primary Host Offset.
  107.           The lower 8 bits are in 3C4h index 19h.
  108.  
  109. 3C4h index 19h (R/W):  Primary Host Offset Register Low.
  110. bit  0-7  Bits 0-7 of the Primary Host Offset. The upper 8 bits are in 3C4h
  111.           index 18h. If extended memory is enabled (3C4h index 1Eh bit4 is
  112.           set) all Host addresses are modified by multiplying either the
  113.           Primary or the Secondary Host Offset with 16 and adding the result
  114.           to the Host address.3C4h index 1Eh controls which operations use
  115.           which Host Offset.
  116.  
  117. 3C4h index 1Ah (R/W):  Display Offset Register High.                  (22,22E)
  118. bit  0-7  Bits 8-15 of the Display Offset.
  119.           The lower 8 bits are in 3C4h index 1Bh.
  120.  
  121. 3C4h index 1Ah (R/W):  Linear Address Register 0                     (32 only)
  122. bit  0-1  Aperture Size Select. Selects the size of the linear Aperture
  123.                Size:  Selected by:
  124.            0:   1M    Aperture Location 20-31
  125.            1:   2M    Aperture Location 21-31
  126.            2:   4M    Aperture Location 22-31
  127.      4-7  Aperture Location Bits 20-23. Bits 20-23 of the Address of the
  128.           linear Aperture. Bits 24-31 are in index 1Bh. Depending on the
  129.           Aperture Size (bits 0-1) bits 20-21 of the address may not be used.
  130.  
  131. 3C4h index 1Bh (R/W):  Display Offset Register Low.                   (22,22E)
  132. bit  0-7  Bits 0-7 of the Display Offset. The upper 8 bits are in 3C4h index
  133.           1Ah. If extended memory and Display Offset are enabled (3C4h index
  134.           1Eh bit 4 and 3 are both set) the Display Offset is multiplied with
  135.           16 and added to the normal display address.
  136.  
  137. 3C4h index 1Bh (R/W):  Linear Address Register 1                     (32 only)
  138. bit  0-7  Aperture Location Bits 24-31. The upper 8 bits of the Address of the
  139.           linear Aperture. Bits 20-23 are in index 1Ah
  140.  
  141. 3C4h index 1Ch (R/W):  Secondary Host Offset Register High.
  142. bit  0-7  Bits 8-15 of the Secondary Host Offset. The lower 8 bits are in 3C4h
  143.           index 1Dh.
  144.  
  145. 3C4h index 1Dh (R/W):  Secondary Host Offset Register Low.
  146. bit  0-7  Bits 0-7 of the Secondary Host Offset. The upper 8 bits are in 3C4h
  147.           index 1Ch. 3C4h index 1Eh controls which operations use this
  148.           register
  149.  
  150. 3C4h index 1Eh (R/W):  Extended Memory Enable Register.
  151. bit  0-1  DRAM Address Configuration. These bits can only be modified
  152.           if 3C4h index 5 bit 2 is set.  0: 64Kx, 1: 256Kx, 3: 1Mx
  153.        2  Secondary Offset Enable. If this bit and bit 4 are set all read
  154.           operations are modified by multiplying the Secondary Host Offset by
  155.           16 and adding the result to the host address.
  156.        3  (22,22E only) If this bit and bit 4 are set all display addresses
  157.           are modified by multiplying the Display Offset by 16 and adding the
  158.           result to the normal display address.
  159.        4  Extended Memory Enable. If set extended memory is enabled.
  160.      5-7  (22E+,32 only) Primary/Secondary Read/Write Select.
  161.             0:  Write to Primary, Read from Secondary
  162.             1:  Write to Primary, Read toggles from Secondary to Primary ?
  163.             2:  Primary at A0000h-AFFFFh, Secondary at B0000h-BFFFFh.
  164.                 Both Read/Write
  165.             3:  Read and Write to Secondary only
  166.             6:  (22E+ only?) Primary at A0000h-A7FFFh, Secondary at A8000h
  167.                  -AFFFFh. Both Read/Write
  168.  
  169. 3C4h index 1Fh (R/W):  Extended Clocking Mode.
  170. bit  0-3  If bit 4 set this determines the font width:
  171.             0   4 bit wide font
  172.             1   7 bit wide font
  173.             2   8 bit wide font
  174.             3   9 bit wide font
  175.             4  10 bit wide font
  176.             5  11 bit wide font
  177.             6  12 bit wide font
  178.             7  13 bit wide font
  179.             8  14 bit wide font
  180.             9  15 bit wide font
  181.            0Bh 16 bit wide font
  182.        4  If set enables extended font width.
  183.        5  (22E,22E+) Clock Output enable if set.
  184.           (32 only) Clock Select Bit 2
  185.        6  (22E,22E+) Clock Select Bit 2
  186.           (32 only) Clock Select Bit 3
  187.        7  Reserved
  188.  
  189. 3C4h index 20h (R/W):  Extended Video Memory Addressing Register
  190. bit    0  Addition of host address bit 16. If set (and 3CEh index 6 bits 2-3 =
  191.           0) the range A0000h-BFFFFh can be used as one 128K window
  192.        1  Extended chain-4 enable if set.
  193.      2-7  Reserved.
  194.  
  195. 3C4h index 21h (R/W):  Extended Pixel Control Register
  196. bit    0  Enable graphics byte path if set. Set in extended 256color modes
  197.        1  Enable packed/nibble pixel format (2 pixels of 4 bits per byte)
  198.           if set.
  199.        2  (32 only) Packed Nibble to Targa Convert Enable. If set 16bit pixel
  200.            data stored as (Bits 0-3 Red, 4-7 Green, 8-11 Blue) (I.e. NeXT) is
  201.            displayed as (Bits 0-4 Red, 5-9 Green, 10-14 Red) (I.e. Targa).
  202.      4-5  Pixel Depth. The number of bytes per pixel. 0: 1-8 bits/pixel
  203.             (1 byte), 1: 9-16b/p (2 bytes), 2: 17-24b/p (3 bytes).
  204.      2-7  Reserved.
  205.  
  206. 3C4h index 22h (R/W):  Bus Width Feed Back Register.
  207. bit    0  (not 32) Enables 16 bit memory access if set.
  208.        1  (not 32) Enables 16 bit I/O access if set
  209.        2  (22E+) Select AT/MCA/CPU Interface. If bit 4 is clear, this bit is
  210.            set for AT busses and clear for MCA busses. If bit 4 set and bit 5
  211.            clear, this bit is set for 386DX systems, clear for 386SX systems.
  212.           (32) AT/MCA Style Operation. If set the Video Subsystem Enable (VSE)
  213.            register is at 46E8h (AT style), if clear at 3C3h (MCA style).
  214.        3  (22E+) Disable CHRDY High. If set CHRDY is driven low and then
  215.            tri-stated, if clear CHRDY is driver low and upon assertion of
  216.            CHRDY momentarily drives it high and then tri-states it to provide
  217.            maximum system performance.
  218.           (32 only) Enable Palette Shadowing. If set writes to the Palette RAM
  219.            are executed, but the LDEV/ and LRDY/ signals are not asserted,
  220.            allowing other devices to respond to the operation
  221.        4  (22E+) Enable CPU Bus. Set for Local Bus, clear for AT and MCA bus
  222.           (32 only) Shadow All Writes. If set all write operations are
  223.            executed, but the LDEV/ and LRDY/ signals are not asserted,
  224.            allowing other devices to respond tp the operation
  225.        5  (22E+) Select 486 Processor Interface. If bit 4 set, this bit is set
  226.            for 486 Local bus systems with 1x clocking, clear for 386 Local Bus
  227.            systems with 2x clocking
  228.           (32 only) Disable All Reads. If set all register reads are ignored,
  229.            except for port 94h, 102h, 3C3h and 46E8h
  230.        6  (22E+) Enable 16bit BIOS if set
  231.           (32 only) VSE Disable. If set accesses to the VSE register (46E8h
  232.            or 3C3h) are ignored
  233.        7  (22E+) Enable BIOS Zero Wait State. If set the ZWS signal is
  234.            asserted during accesses to C0000h-C7FFFh, resulting in zero wait
  235.            states
  236.           (32 only) VSE Read Disable. If set the VSE register (46E8h or 3C3h)
  237.            is write only
  238.  
  239. 3C4h index 23h (R/W):  Performance Select Register
  240. bit    0  (not 32) Video Memory Width Select. Set if the video memory is 32
  241.            bit wide, clear if it is 16bit wide.
  242.        1  (not 32) Selects 3 clock RAS cycles if set. Should not be set!!
  243.        2  (not 22E+,32) Enables Fast Page Mode if set. Set by external
  244.            resistor.
  245.           (32 only) 4 Clock RAS# Precharge. If set the RAS precharge time is 4
  246.            clocks, 3 if clear.
  247.        3  (22E+,32) Select AT or PS/2 Style BIOS. If clear AT style operation
  248.            is selected and mode switches between monochrome and color modes
  249.            require the BIOS equipment flag to be updated, if clear PS/2 mode
  250.            operation is selected and mode switches are unrestricted.
  251.        4  (22E,22E+) Wait State Select. In ATbus systems zero wait states is
  252.            enabled if clear. In Local Bus mode one wait state if clear, no
  253.            wait states if set
  254.           (32 only) Zero Wait State Select. If set RDY will be asserted in the
  255.            first T2 of a write operation (assuming the write FIFO is not full)
  256.            and RDY will be asserted in the second T2 cycle of a read operation
  257.            assuming the data is not ready
  258.        5  (22E+ only) RAS/CAS Swap. If set the RAS and CAS lines are swapped.
  259.           Allows higher performance on Local Bus systems.
  260.        6  (not 22E+,32) Unlatched Memory Writes (Only in 256 color modes with
  261.           OSC3). If set limits the duration of CHRDY assertion time by
  262.           limiting FIFO fill lengths.
  263.        7  Latched Memory Reads. If set the assertion of CHRDY can be
  264.           eliminated during read cycles.
  265.  
  266. 3C4h index 24h (R/W):  Color Expanded Write Foreground Register.
  267. bit  0-7  When in expanded write mode (3C4h index 26h bit 0 set) a monochrome
  268.           bitmap can be expanded to 256 or 16 colors 8 or 16 pixels at a time.
  269.           '1' bits in the bitmap are expanded to this color. For 16 color
  270.           modes only bit 0-3 are used.
  271.  
  272. 3C4h index 25h (R/W):  Color Expanded Write Background Register.
  273. bit  0-7  When in expanded write mode (3C4h index 26h bit 0 set) a monochrome
  274.           bitmap can be expanded to 256 or 16 colors 8 or 16 pixels at a time.
  275.           '0' bits in the bitmap are expanded to this color. For 16 color
  276.           modes only bit 0-3 are used.
  277.  
  278. 3C4h index 26h (R/W):  Extended Read/Write Control Register.
  279. bit    0  FG/BG Color Expansion Enable. When set enables expansion from
  280.           monochrome bitmaps to full color using 3C4h index 24h and 25h as
  281.           fore- and background colors.
  282.        1  256Color Expansion Enable Mode 1. If set enables 256 color
  283.           expansion. If clear 8bit pixel values can be written to the
  284.           framebuffer as in standard mode 13h. If clear and bit 0 is set then
  285.           16 color expansion is enabled. If set the upper 4 bits of the host
  286.           data will be expanded to four separate pixels, each is the
  287.           foreground color (index 24h) if the corresponding bit is set, the
  288.           background color (index 25h) if it is clear
  289.        2  (not 22E+,32 ?) Color Expansion Enable Mode 2. If set accesses to
  290.            even addresses will work on the upper 4 bits of the data at the
  291.            even address and the lower 4 bits of the data at the following odd
  292.            address. This mode should only be used when the chip is configured
  293.            as a 16 bit device and only with even addresses.
  294.        3  Planar to Packed Pixel Conversion Enable. Enables 16/256 color pixel
  295.           expansion when set. This bit should always be set when bit 1 is.
  296.        4  Packed Pixel Mask Enable. When in packed pixel modes, this bit is
  297.           set to enable pixel masking operations. This bit should be set when
  298.           bit 1 is set.
  299.        5  Packed Pixel Color Compare. When set configures the color compare
  300.           logic to operate on packed pixel data. This bit should be set when
  301.           bit 1 is set.
  302.        6  Quad Word Read Latch for Writes. If set 64 bits are written when 16
  303.           bit latched write operations occurs in write mode 1. Allows fast
  304.           copy of data within the framebuffer.
  305.        7  (22,22E) Address Toggle. When bit 6 is set this bit specifies
  306.             how address information is maintained with the latched data.
  307.           (22E+,32) Color Transparency Enable. If set the upper 4 bits of
  308.             rotated CPU data is the Transparency mask
  309.  
  310. 3C4h index 27h (R/W):  Miscellaneous Feature Select Register.
  311. bit    0  Extended Palette addressing enable. If set I/O address bit 15 is
  312.           passed to the RS2 pin of the palette DAC chip, so that I/O address
  313.           03C6h - 03C9h address the first 4 registers of the DAC chip and
  314.           83C6h - 83C9h address four other registers.
  315.           Useful for advanced DACs with overlay and command registers.
  316.        1  64K/256Kx16 Dual WE DRAMs. If set the 77C22E outputs DRAM interface
  317.           signals for direct interfacing with 64K x 16 DRAMs (22E+:
  318.           64K/256Kx16).
  319.        2  Disable ROM BIOS CS. If set this bit disables the address decoding
  320.           for the BIOS ROM at C000h-C7FFFh thus allowing this area to be used
  321.           for  other adapters.
  322.        3  User Defined Output (I/O Control pin 2). This bit is output on pin 2
  323.           On the 32BLT this is output on pin 126
  324.        4  (22E+,32) IRQ Drive Low. If set (or in MCA mode) the IRQ signal will
  325.            drive low and release, if clear and in AT or Local Bus mode the IRQ
  326.            signal will drive high and release to tristate.
  327.        5  (22E+) Enable Output of Pixel Data. If set disables tristating of
  328.            pixel data when EVID/ is active
  329.           (32 only) 3C0h-3DFh Full Range Addressing. If set LRDY/ is asserted
  330.            for any I/O access in the range 3C0h-3DFh.
  331.        6  (22E+) Enable Output of PCLK. If set disables tristating of PCLK
  332.            when EVID/ is active
  333.           (32 only) Zero Wait State Read Enable. If set a zero wait read cycle
  334.            results if the data is available from the read caches.
  335.        7  (22E+) Enable Output of BLANK/. If set disables tristating of the
  336.            BLANK/ signal when EVID/ is active, if clear BLANK/ is tristated
  337.            when EVID/ is active
  338.           (32 only) Remapped BIOS Write. If set writes to A0000h-AFFFFh are
  339.            written to the BIOS allowing BIOS RAM updates without disabling
  340.            BIOS shadowing and reallocation of C0000h-C7FFFh
  341.  
  342. 3C4h index 28h (R/W):  Color Key Control                        (22E+,32 only)
  343. bit    0  Enable Color Key if set
  344.        1  Color Key Output Control. If set the Color Key Output signal goes
  345.           active on the rising edge of PCLK, if clear on the falling edge.
  346.      2-3  Color Key Sample Interval. Determines the sample interval of the
  347.           pixel byte stream. The sampling begins with the first byte after
  348.           display has been enabled. 0: Every byte, 1: Every second byte,
  349.             2: Every third byte, 3: Every fourth byte.
  350.      4-5  Video Delay. Controls the delay of the tristate control signal after
  351.           a color match in number of sample intervals to delay assertion of
  352.           the tristate control signal. 0: 0 sample intervals, 1: 1, 2: 2, 3: 3
  353.        6  Disable Tristate Output. If set disables the tristating of PCLK and
  354.           PIX during the color match interval, if clear PCLK and PIX will
  355.           tristate during the color match interval
  356.        7  (32 only) Tristate Delay Mode. If set the tristate delay specified
  357.            in bits 4-5 are in bytes, if clear in pixels.
  358.  
  359. 3C4h index 29h (R/W):  Color Key Match Value                    (22E+,32 only)
  360. bit  0-7  The color the Color Key circuitry looks for. When a match is found
  361.           the Color Key Match signal is asserted
  362.  
  363. 3C4h index 2Ah W(R/W):  Color Key Match Value High                   (32 only)
  364. bit 0-15  Bits 8-23 of the Color Kay Match value in index 29h
  365.  
  366. 3C4h index 2Dh (R/W):  CRC Control                                 (22E+ only)
  367. bit    0  Arm CRC Circuit. If set causes the CRC circuit to operate on video
  368.           data for one frame (VSYNC to VSYNC). For interlaced modes two frames
  369.           are used.
  370.        1  If set forces the CRC value to 1. Must be reset prior to CRC testing
  371.        2  Self Test Enable. If set no external data is used for the CRC
  372.           generation. Intended for testing.
  373.  
  374. 3C4h index 2Eh W(R):  CRC Data                                     (22E+ only)
  375. bit 0-15  The generated CRC value.
  376.  
  377. 3C4h index 30h (R/W):  Memory Mapped Register Control                (32 only)
  378. bit    0  Enable Accelerator Control Menu (ACM). If set the ACM is enabled at
  379.           the address specified in index 31h-33h.
  380.        1  Enable Cursor Register Access. If set the Cursor Position registers
  381.           (3C4h index 0Dh-10h) can be accessed at index 0Ch in the ACM.
  382.        2  Enable Primary/Secondary Offset Register Access. If set the Primary
  383.           and Secondary Offset registers (3C4h index 18h,19h,1Ch and 1Dh) can
  384.           be accessed in the ACM
  385.  
  386. 3C4h index 31h 3(R/W):  ACM Aperture Register 1-3                    (32 only)
  387. bit 0-23  Bits 8-31 of the ACM Aperture address. The lower 8 bits are 0.
  388.  
  389. 3C4h index 3Eh (R/W):  BIOS Utility Register 0                       (32 only)
  390. bit  0-7  Scratch Pad
  391.        0  Set for other HiColor DACs
  392.        1  Set for DACs with fourth read of 3C6h = 44h (MUSIC MU9c9910)
  393.        2  Set for DACs with fourth read of 3C6h = B3h (which ??)
  394.        4  Appears to be the inverse of 3C4h index 22h bit 0
  395.  
  396. 3C4h index 3Fh (R/W):  BIOS Utility Register 1                       (32 only)
  397. bit  0-7  Scratch Pad
  398.  
  399. 3d4h index 30h (R/W):  Extended Horizontal Timings Register.
  400. bit    0  Horizontal Total bit 8. Bit 8 of the Horizontal Total register.
  401.           (3d4h index 0). Bit 9 is in index 32h bit 0.
  402.        1  Horizontal Display Enable End bit 8. Bit 8 of the Horizontal Display
  403.           Enable End register (3d4h index 1). Bit 8 is in index 32h bit 1.
  404.        2  Start Horizontal Blanking bit 8. Bit 8 of the Start Horizontal
  405.           Blanking register (3d4h index 2). Bit 9 is in index 32h bit 2.
  406.        3  Start Horizontal Retrace bit 8. Bit 8 of the Start Horizontal
  407.           Retrace register (3d4 index 4). Bit 9 is in index 32h bit 4
  408.        4  (22E, 22E+,32) Interlace Enable. Enables interlace video for high
  409.            resolution graphics modes. Note in interlaced modes the line
  410.            doubling from index 9 bits 0-4&7 is ignored. Also Line Compare
  411.            should not be used with interlaced modes
  412.        5  (22E+,32) Enable Extended End Bits. If set enables the extended end
  413.            bits (index 32h bits 4-7 and index 33h bits 5-7)
  414.        6  (22E+) CRT Clock Divide by Two. If set the video clock is divided
  415.            by 2.
  416. Note: The extended Function Enable Register (3C4h index 5) bit 0 must be 1 to
  417.       access this register.
  418.  
  419. 3d4h index 31h (R/W):  Extended Start Address Register
  420. bit  0-3  Display Start Address bit 16-19. (bit 0-15 are in 3d4h index Ch and
  421.           Dh).
  422.        4  Bit 8 of Address Row Offset. Bit 8 of the CRTC Offset (3d4h index
  423.           13h).
  424.  
  425. 3d4h index 32h (R/W):  Extended Horizontal Timings Two Register     (22E+, 32)
  426. bit    0  Horizontal Total Bit 9. Bit 9 of the Horizontal Total register (3d4h
  427.           index 0). Bit 8 is in index 30h bit 0
  428.        1  Horizontal Display Enable End bit 9. Bit 9 of the Horizontal Display
  429.           End register (3d4h index 1). Bit 8 is in index 30h bit 1
  430.        2  Horizontal Blank Start bit 9. Bit 9 of the Start Horizontal Blanking
  431.           register (3d4h index 2). Bit 8 is in index 30h bit 2.
  432.        3  Horizontal Retrace Start bit 9. Bit 9 of the Start Horizontal
  433.           Retrace register (3d4h index 0). Bit 8 is in index 30h bit 3.
  434.      4-5  Horizontal Blank End bits 6-7. Bits 6-7 of the Horizontal Blanking
  435.           End register (3d4h index 3).
  436.      6-7  Horizontal Retrace End bits 5-6. Bits 5-6 of the Horizontal Retrace
  437.           register (3d4h index 5).
  438.  
  439. 3d4h index 33h (R/W):  Extended Vertical Timings                   (22E+ only)
  440. bit    0  Vertical Total bit 10.  Bit 10 of the Vertical Total register (3d4h
  441.           index 6). Bits 8 and 9 are in 3d4h index 7 bits 0 and 5.
  442.        1  Vertical Display Enable End bit 10. Bit 10 of the Vertical Display
  443.           End register (3d4h index 12h). Bits 8 and 9 are in 3d4h index 7 bits
  444.           1 and 6
  445.        2  Vertical Blank Start bit 10. Bit 10 of the Vertical Blank Start
  446.           register (3d4h index 15h). Bit 8 is in 3d4h index 7 bit 3 and bit 9
  447.           in 3d4h index 9 bit 5
  448.        3  Vertical Retrace Start bit 10. Bit 10 of the Vertical Retrace Start
  449.           register (3d4h index 10h). Bits 8 and 9 are in 3d4h index 7 bits 2
  450.           and 7
  451.        4  Line Compare bit 10. Bit 10 of the Line Compare register (3d4h index
  452.           18h). Bit 8 is in 3d4h index 7 bit 4 and bit 9 in 3d4h index 9 bit 6
  453.      5-6  Vertical Blank End bits 8-9. Bits 8-9 of the Vertical Blank End
  454.           register (3d4h index 16h).
  455.        7  Vertical Retrace End bit 4. Bit 4 of the Vertical Retrace End
  456.           register. Bits 0-3 are in 3d4h index 11h bits 0-3.
  457.  
  458. 3d4h index 34h (R/W):  Monitor Power Management                      (32 only)
  459. bit    0  Set HSync low
  460.        1  Set HSync high
  461.        2  Set VSync low
  462.        3  Set VSync high
  463.  
  464.  
  465. The Memory Mapped Registers (Accelerator Control Menu - ACM) can only be
  466. accessed when 3C4h index 30h bit 0 is set. The base address of the ACM
  467. registers are defined in 3C4h index 31h-33h.
  468.  
  469. Memory 00h W(R/W):  Primary Offset                                   (32 only)
  470. bit 0-15  If 3C4h index 30h bit 2 is set this is the Primary Host Offset
  471.           register (3C4h index 18h-19h)
  472.  
  473. Memory 04h W(R/W):  Secondary Offset                                 (32 only)
  474. bit 0-15  If 3C4h index 30h bit 2 is set this is the Primary Host Offset
  475.           register (3C4h index 1Ch-1Dh)
  476.  
  477. Memory 09h (R/W):  Mode Control Register                             (32 only)
  478. bit  0-1  DRAM Address Configuration. These bits can only be modified
  479.           if 3C4h index 5 bit 2 is set.  0: 64Kx, 1: 256Kx, 3: 1Mx
  480.        2  Secondary Offset Enable. If this bit and bit 4 are set all read
  481.           operations are modified by multiplying the Secondary Host Offset by
  482.           16 and adding the result to the host address.
  483.        4  Extended Memory Enable. If set extended memory is enabled.
  484.      5-7  Primary/Secondary Read/Write Select.
  485.             0:  Write to Primary, Read from Secondary
  486.             1:  Write to Primary, Read toggles from Secondary to Primary ?
  487.             2:  Primary at A0000h-AFFFFh, Secondary at B0000h-BFFFFh.
  488.                 Both Read/Write
  489.             3:  Read and Write to Secondary only
  490. Note: This is the Extended Memory Enable register (3C4h index 1Eh).
  491.  
  492. Memory 0Ch W(R/W):  Cursor X Position Register                       (32 only)
  493. bit 0-10  If 3C4h index 30h bit 1 is set this is the Cursor X Position
  494.           registers (3C4h index 0Dh and 0Eh)
  495.  
  496. Memory 0Eh W(R/W):  Cursor Y Position Register                       (32 only)
  497. bit 0-11  If 3C4h index 30h bit 1 is set this is the Cursor Y Position
  498.           registers (3C4h index 0Fh and 10h)
  499.  
  500. Memory 30h (R/W):  BLT Start Register                                (32 only)
  501. bit    0  Start/Stop. Set to start a BLT operation, clear to stop the
  502.           current operation
  503.        1  Text BLT. Set for Text Mode BLTs, clear for standard BLTs
  504.        2  BLT Completed Interrupt. If set causes an interrupt when the
  505.           Accelerator engine has completed an operation. The interrupt is
  506.           cleared when a 0 is written to this bit.
  507.        3  Write FIFO Empty Interrupt. If set enables an interrupt when the
  508.           Write FIFO goes empty
  509.  
  510. Memory 32h (R):  BLT Status Register                                 (32 only)
  511. bit    0  Ready. If clear the engine is busy, if set the operation has
  512.           finished and the parameters can be updated.
  513.        1  Error. If set indicates that an illegal BLT operation was entered.
  514.           This bit is cleared when a new operation is started.
  515.        2  BLT Done Interrupt Status. Set when an interrupt has been generated
  516.           due to a BLT Done condition.
  517.        3  Write FIFO Near Empty Interrupt. Set if an interrupt has been
  518.           generated due to a Write FIFO Near Empty condition.
  519.        4  Write FIFO Full. Set when the Write FIFO is full
  520.  
  521. Memory 34h W(R/W):  BLT Control Register                             (32 only)
  522. bit    1  Color Compare Invert. If clear color match operations return 1 for
  523.           the pixels which match the reference color and 0 for those that
  524.           don't, if set this is reversed.
  525.        3  Map Width. If set the data transferred when either the Source or
  526.           Destination data is in system memory is padded or truncated to
  527.           achieve word aligned data.
  528.        4  Large Pattern Enable. If clear 8x8 pixel patterns are used, if set
  529.           16x16 patterns are used for 256 color modes.
  530.        5  Transparency Enable. If set enables background transparency for
  531.           color expand operations.
  532.        6  Vertical Direction. The Blit direction is "down" (increasing Y) if
  533.           set, "up" (decreasing Y) if clear
  534.        7  Horizontal Direction. The Blit direction is "left" (increasing X) if
  535.           set, "right" (decreasing X) if clear.
  536.        9  Color Fill Enable. If set the operation is a solid fill and only one
  537.           pixel of the pattern data need be read.
  538.       10  Color Compare Enabled if set
  539.       11  Color Expand Enable. If set the source data is monochrome and is
  540.           replaced with fore/background data in the full color depth
  541.       12  Destination Address Mode. If set the source data is stored in
  542.           linear format, if clear it is stored in rectangular format.
  543.       13  Source Address Mode. If set the destination data is stored in
  544.           linear format, if clear it is stored in rectangular format.
  545.       14  Destination Location. If set the Destination is in the frame
  546.           buffer, if clear the destination data is transferred to the system
  547.           memory via the ?read? FIFO.
  548.       15  Source Location. If set the Source data comes from the frame buffer,
  549.           if clear the system supplies the Source data
  550.  
  551. Memory 38h (R/W):  Pattern X Rotation                                (32 only)
  552. bit  0-3  The Horizontal Pixel alignment of the pattern
  553.  
  554. Memory 39h (R/W):  Pattern Y Rotation                                (32 only)
  555. bit  0-3  The Vertical Pixel alignment of the pattern
  556.  
  557. Memory 3Ah (R/W):  Raster Opcode                                     (32 only)
  558. bit  0-7  The raster opcode. See MS-Windows trinary raster codes for the full
  559.           list. CCh is copy source -> Destination
  560.  
  561. Memory 3Ch W(R/W):  Bitmap Dimension Width                           (32 only)
  562. bit 0-11  Bitmap Width. The width of the Source and Destination bitmaps in
  563.           pixels
  564.  
  565. Memory 3Eh W(R/W):  Bitmap Dimension Height                          (32 only)
  566. bit 0-11  Bitmap Height. The height of the Source and Destination bitmaps in
  567.           pixels. For Text BLTs this is the character cell height
  568.  
  569. Memory 40h D(R/W):  Destination Register                             (32 only)
  570. bit  0-2  Bit position for monochome bitmaps. For Color Compare to Memory BLTs
  571.           this field specifies the initial bit alignment of the Destination
  572.           bitmap
  573.     3-24  Destination Address. This is the address of the starting corner of
  574.           the Destination Bitmap
  575.  
  576. Memory 44 D(R/W):  Source Register                                   (32 only)
  577. bit  0-2  Bit position for monochome bitmaps. For Color Expand BLTs this field
  578.           specifies the initial bit alignment of the Source bitmap
  579.     3-24  Source Address. This is the address of the starting corner of the
  580.           Destination Bitmap
  581.  
  582. Memory 48h D(R/W):  Pattern Register                                 (32 only)
  583. bit  0-2  Bit offset, must be 0
  584.     3-24  Pattern Address. This is the address of the starting corner of
  585.           the Pattern. The address must be DWORD aligned.
  586.  
  587. Memory 4Ch D(R/W):  Foreground Color Register                        (32 only)
  588. bit 0-23  The foreground color
  589.  
  590. Memory 50h D(R/W):  Background Color Register                        (32 only)
  591. bit 0-23  The Background Color.
  592.  
  593.  
  594.   ID NCR VGA:
  595.  
  596.   if testinx2($3C4,5,5) then
  597.   begin
  598.     wrinx($3C4,5,0);   {Lock extensions}
  599.     if not testinx($3C4,$10) then
  600.     begin
  601.       wrinx($3C4,5,1);
  602.       if testinx($3C4,$10) then
  603.         case rdinx($3C4,8) div 16 of
  604.           0:NCR 77C22;
  605.           1:NCR 77C21;
  606.           2:if (rdinx($3C4,8) and 15)<8 then NCR 77C22E
  607.                                         else NCR 77C22E+;
  608.           3:NCR 77c32BLT;
  609.         end;
  610.     end;
  611.   end;
  612.  
  613.  
  614.   Video Modes:
  615.  
  616.   40h G 1600 1200  16  PL4                    32BLT
  617.   41h G 1600 1200 256  P8                     32BLT
  618.   50h G  640  480 16m  P24                    32BLT
  619.   51h G  800  600 16m  P24                    32BLT
  620.   54h T  132   50  16  (8x8)
  621.   55h T  132   25  16  (8x16)
  622.   56h T  132   50   4  (8x8)
  623.   57h T  132   25   4  (8x16)
  624.   58h G  800  600  16  PL4
  625.   59h G  800  600   2
  626.   5Ah G 1024  768   2
  627.   5Bh G 1024  768  16  PL4    (Interlaced)
  628.   5Ch G  800  600 256  P8
  629.   5Dh G 1024  768  16  PL4
  630.   5Eh G  640  400 256  P8
  631.   5Fh G  640  480 256  P8
  632.   61h G 1024  768 256  P8     (Interlaced)    22E !!
  633.   62h G 1024  768 256  P8                     22E !!
  634.   67h G 1280 1024  16  PL4    (Interlaced)    22E !!
  635.   6Ah G 1280 1024 256  P8     (Interlaced)    22E !!
  636.   6Bh G 1280  960 256  P8                     22E !!
  637.   6Ch G 1280 1024  16  PL4                    32BLT
  638.   70h G  640  480 32k  P15                    22E !!
  639.   71h G  800  600 32k  P15                    22E
  640.   72h G 1024  768 32k  P15                    32BLT
  641.   78h G  640  480 64k  P16                    22E
  642.   79h G  800  600 64k  P16                    22E
  643.   7Ah G 1024  768 64k  P16                    32BLT
  644.  
  645. Note: Modes above 57h may require a driver (setmode.sys) to be loaded
  646.       depending on BIOS version.
  647.